package cn.sdstudio.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cn.sdstudio.vo.FavoriteVO;
import cn.sdstudio.vo.RelicSiteVO;
import cn.sdstudio.entity.Collect;
import cn.sdstudio.entity.RelicSite;
import org.apache.ibatis.annotations.*;
import java.util.List;

public interface RelicSiteMapper extends BaseMapper<RelicSite> {
    Page<RelicSiteVO> getRemainsUserPageVo(Page<RelicSiteVO> iPage);

    Page<RelicSite> getRemainsPageVo(Page<RelicSite> iPage);

    int addCollect(Collect collect);

    List<FavoriteVO> getMyCollect(int userid);

    int deleteFavorite(@Param("id") int id, @Param("user_id") int userId);

    List<RelicSite> searchByTitle(String title);

}